/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package picstore.web.fornecedores;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 *
 * @author erica
 */
@Entity
@Table(name="fornecedor")
@SequenceGenerator(name="fn_codigo", sequenceName="fornecedor_fn_codigo_seq")
public class Fornecedores implements Serializable {
    @Id
    @Basic(optional =false)
    @GeneratedValue(generator="fn_codigo", strategy= GenerationType.AUTO)
    @Column(name="fn_codigo")
        private Integer fn_codigo;
    @Column(name="fn_nome")
        private String fn_nome;

    public Integer getFn_codigo() {
        return fn_codigo;
    }

    public void setFn_codigo(Integer fn_codigo) {
        this.fn_codigo = fn_codigo;
    }

    public String getFn_nome() {
        return fn_nome;
    }

    public void setFn_nome(String fn_nome) {
        this.fn_nome = fn_nome;
    }

   
    @Override
    public int hashCode() {
        int hash = 5;
        hash = 47 * hash + (this.fn_codigo != null ? this.fn_codigo.hashCode() : 0);
        hash = 47 * hash + (this.fn_nome != null ? this.fn_nome.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Fornecedores other = (Fornecedores) obj;
        return true;
    }
   
    
}
